import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, ViewController, ModalController } from 'ionic-angular';

/**
 * Generated class for the ModalLoginPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-modal-login',
  templateUrl: 'modal-login.html',
})
export class ModalLoginPage {

  constructor(public navCtrl: NavController, public navParams: NavParams, private viewCtrl:ViewController, private modalCtrl:ModalController) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad ModalLoginPage');
  }
  //手机登录
  phoneLogin() {
    // let modal = this.modalCtrl.create("LoginPage");
    // modal.onDidDismiss(data=>{
    //   console.log("关闭手机登录界面==="+data);
    // })
    // modal.present();
    this.navCtrl.push("LoginPage")

    setTimeout(() => {
      this.dismiss();
    }, 500);
  }

  dismiss() {
    this.viewCtrl.dismiss();
  }
}
